package com.shangting.common.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import com.shangting.common.enums.LeaseSourceType;
import com.shangting.common.enums.LeaseStatus;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.Date;

@Schema(description = "租约信息表")
@TableName(value = "lease_agreement")
public class LeaseAgreement extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Schema(description = "承租人手机号码")
    @TableField(value = "phone")
    private String phone;

    @Schema(description = "承租人姓名")
    @TableField(value = "name")
    private String name;

    @Schema(description = "承租人身份证号码")
    @TableField(value = "identification_number")
    private String identificationNumber;

    @Schema(description = "签约公寓id")
    @TableField(value = "apartment_id")
    private Long apartmentId;

    @Schema(description = "签约房间id")
    @TableField(value = "room_id")
    private Long roomId;

    @Schema(description = "租约开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(value = "lease_start_date")
    private Date leaseStartDate;

    @Schema(description = "租约结束日期")
    @TableField(value = "lease_end_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date leaseEndDate;

    @Schema(description = "租期id")
    @TableField(value = "lease_term_id")
    private Long leaseTermId;

    @Schema(description = "租金（元/月）")
    @TableField(value = "rent")
    private BigDecimal rent;

    @Schema(description = "押金（元）")
    @TableField(value = "deposit")
    private BigDecimal deposit;

    @Schema(description = "支付类型id")
    @TableField(value = "payment_type_id")
    private Long paymentTypeId;

    @Schema(description = "租约状态")
    @TableField(value = "status")
    private LeaseStatus status;

    @Schema(description = "租约来源")
    @TableField(value = "source_type")
    private LeaseSourceType sourceType;

    @Schema(description = "备注信息")
    @TableField(value = "additional_info")
    private String additionalInfo;

    public LeaseAgreement() {
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIdentificationNumber() {
        return identificationNumber;
    }

    public void setIdentificationNumber(String identificationNumber) {
        this.identificationNumber = identificationNumber;
    }

    public Long getApartmentId() {
        return apartmentId;
    }

    public void setApartmentId(Long apartmentId) {
        this.apartmentId = apartmentId;
    }

    public Long getRoomId() {
        return roomId;
    }

    public void setRoomId(Long roomId) {
        this.roomId = roomId;
    }

    public Date getLeaseStartDate() {
        return leaseStartDate;
    }

    public void setLeaseStartDate(Date leaseStartDate) {
        this.leaseStartDate = leaseStartDate;
    }

    public Date getLeaseEndDate() {
        return leaseEndDate;
    }

    public void setLeaseEndDate(Date leaseEndDate) {
        this.leaseEndDate = leaseEndDate;
    }

    public Long getLeaseTermId() {
        return leaseTermId;
    }

    public void setLeaseTermId(Long leaseTermId) {
        this.leaseTermId = leaseTermId;
    }

    public BigDecimal getRent() {
        return rent;
    }

    public void setRent(BigDecimal rent) {
        this.rent = rent;
    }

    public BigDecimal getDeposit() {
        return deposit;
    }

    public void setDeposit(BigDecimal deposit) {
        this.deposit = deposit;
    }

    public Long getPaymentTypeId() {
        return paymentTypeId;
    }

    public void setPaymentTypeId(Long paymentTypeId) {
        this.paymentTypeId = paymentTypeId;
    }

    public LeaseStatus getStatus() {
        return status;
    }

    public void setStatus(LeaseStatus status) {
        this.status = status;
    }

    public LeaseSourceType getSourceType() {
        return sourceType;
    }

    public void setSourceType(LeaseSourceType sourceType) {
        this.sourceType = sourceType;
    }

    public String getAdditionalInfo() {
        return additionalInfo;
    }

    public void setAdditionalInfo(String additionalInfo) {
        this.additionalInfo = additionalInfo;
    }
}